home *** CD-ROM | disk | FTP | other *** search
- /*******************************************************************************
-
- File: disk.h
-
- Contains:
- Contains most of the defines for the SCSI disk driver.
-
- Written by:
- Nobody would admit to it.
-
- Copyright: © 1986-1993 by Apple Computer, Inc., all rights reserved.
-
-
- *******************************************************************************/
-
-
- #define MAXRETRIES 16
-
- /* various flags */
- #define READ_F 0
- #define WRITE_F 1
-
- /* internal driver error codes (returned by scsiop routine) */
- #define ARB_ERR -1
- #define SEL_ERR -2
- #define CMD_ERR -3
- #define COMPL_ERR -4
- #define SENSE_ERR -7
- #define CHK_CND -8
-
- #define DRVQHDR 0x308 /* drive queue header */
-
- #define BLKSIZE 512
-
- #define REFNUMTOID(x) (~(x) - 32) /* gets the SCSI ID from driver refnum */
- #define IDTOREFNUM(x) (~(32 + x)) /* SCSI ID number to refnum (converse of above) */
-
- #define NODRVNUM 0xFFFF /* Used to show that an entry in the pv array is empty. */
-
- /* Values returned by GetPartitionType. */
- #define ISMACDRIVER 1 /* Partition is of type Apple_Driver for the Macintosh. */
- #define ISHFS 2 /* Partition is of type Apple_HFS, should be mounted. */
- #define ISNOTADDTOQUEUE 3 /* Partition is of types Apple_partition_map, Apple_Free or Apple_Scratch. */
-
- /* Used to determine if these traps exist. */
- #define SDTRAP 0x95
- #define UNIMPTRAP 0x9F
- #define SCSIATOM 0x89
-
- #define ASYNC 0x400 /* Asynchronous bit in ioTrap */
- #define IMMED 0x200 /* Immediate bit in ioTrap */
-
- #define MAXPARTITIONS 20 /* Number of partitions per drive */
-
- /*
- * Beware: this is not transportable
- */
- typedef struct { /* Definition of a packed device ident */
- unsigned targetID : 5; /* TargetID */
- unsigned LUN : 3; /* LUN */
- } PackedDevID;
-
- /* The following defines refer to the items in knownPartitionTypes. */
- #define POS_BEGIN 0
- #define POS_APPLE_DRIVER 0
- #define POS_APPLE_HFS 1
- #define POS_END 5
-
-